<?
if (count($list_of_matches) > 0) {
    print '<table class="table_alt"><tr class="table_toprow"><td><img src="' . $BASE_PATH . 'images/video_icon.png" /></td><td><img src="' . $BASE_PATH . 'images/download.png" /></td><td>Match Number</td><td colspan="3">Red Alliance</td><td colspan="3">Blue Alliance</td><td colspan="2">Scores</td></tr>';
	$complevels = array(10, 20, 30, 40, 50);
	foreach ($complevels as $complevel) {
	    $included_complevel_header = false;
		foreach ($list_of_matches as $match) {
		    if ($match->getCompLevel() == $complevel) {
		        if (!$included_complevel_header) {
		            print "<tr class=\"table_toprow\"><td colspan=\"11\" >{$tba->stringComplevel($complevel)}</td></tr>";
		            $included_complevel_header = true;
		        }
			    include "views/matchrow.php";
			}
		}
	}
	print '</table>';
} else {
    print "<p>No matches have been played yet.</p>";
}
?>